From 556c02640d7e37e98ae2c69ed40fc8712c78d6fc Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 23 Sep 2014 07:33:23 -0700 Subject: [PATCH] Remove the deprecated -u flag This flag has been deprecated in favor of `cargo update` for quite some time now. --- src/bin/bench.rs | 1 - src/bin/build.rs | 2 -- src/bin/doc.rs | 2 -- src/bin/run.rs | 2 -- src/bin/test.rs | 2 -- src/cargo/ops/cargo_compile.rs | 8 +------- 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/bin/bench.rs b/src/bin/bench.rs index d57f11495..5448adfaf 100644 --- a/src/bin/bench.rs +++ b/src/bin/bench.rs @@ -35,7 +35,6 @@ pub fn execute(options: Options, shell: &mut MultiShell) -> CliResult let mut ops = ops::TestOptions { no_run: options.flag_no_run, compile_opts: ops::CompileOptions { - update: false, env: "bench", shell: shell, jobs: options.flag_jobs, diff --git a/src/bin/build.rs b/src/bin/build.rs index eaa433a25..1a977920a 100644 --- a/src/bin/build.rs +++ b/src/bin/build.rs @@ -20,7 +20,6 @@ Options: --features FEATURES Space-separated list of features to also build --no-default-features Do not build the `default` feature --target TRIPLE Build for the target triple - -u, --update-remotes Deprecated option, use `cargo update` instead --manifest-path PATH Path to the manifest to compile -v, --verbose Use verbose output ", flag_jobs: Option, flag_target: Option, @@ -39,7 +38,6 @@ pub fn execute(options: Options, shell: &mut MultiShell) -> CliResult }; let mut opts = CompileOptions { - update: options.flag_update_remotes, env: env, shell: shell, jobs: options.flag_jobs, diff --git a/src/bin/doc.rs b/src/bin/doc.rs index c24ae47ac..a1c0beaf2 100644 --- a/src/bin/doc.rs +++ b/src/bin/doc.rs @@ -17,7 +17,6 @@ Options: -j N, --jobs N The number of jobs to run in parallel --features FEATURES Space-separated list of features to also build --no-default-features Do not build the `default` feature - -u, --update-remotes Deprecated option, use `cargo update` instead --manifest-path PATH Path to the manifest to document -v, --verbose Use verbose output @@ -35,7 +34,6 @@ pub fn execute(options: Options, shell: &mut MultiShell) -> CliResult let mut doc_opts = ops::DocOptions { all: !options.flag_no_deps, compile_opts: ops::CompileOptions { - update: options.flag_update_remotes, env: if options.flag_no_deps {"doc"} else {"doc-all"}, shell: shell, jobs: options.flag_jobs, diff --git a/src/bin/run.rs b/src/bin/run.rs index 82b8eb49b..afd3a27b0 100644 --- a/src/bin/run.rs +++ b/src/bin/run.rs @@ -19,7 +19,6 @@ Options: --features FEATURES Space-separated list of features to also build --no-default-features Do not build the `default` feature --target TRIPLE Build for the target triple - -u, --update-remotes Deprecated option, use `cargo update` instead --manifest-path PATH Path to the manifest to execute -v, --verbose Use verbose output @@ -32,7 +31,6 @@ pub fn execute(options: Options, shell: &mut MultiShell) -> CliResult let root = try!(find_root_manifest_for_cwd(options.flag_manifest_path)); let mut compile_opts = ops::CompileOptions { - update: options.flag_update_remotes, env: if options.flag_release { "release" } else { "compile" }, shell: shell, jobs: options.flag_jobs, diff --git a/src/bin/test.rs b/src/bin/test.rs index 0355e1c1a..9f6d74738 100644 --- a/src/bin/test.rs +++ b/src/bin/test.rs @@ -19,7 +19,6 @@ Options: --features FEATURES Space-separated list of features to also build --no-default-features Do not build the `default` feature --target TRIPLE Build for the target triple - -u, --update-remotes Deprecated option, use `cargo update` instead --manifest-path PATH Path to the manifest to build tests for -v, --verbose Use verbose output @@ -35,7 +34,6 @@ pub fn execute(options: Options, shell: &mut MultiShell) -> CliResult let mut ops = ops::TestOptions { no_run: options.flag_no_run, compile_opts: ops::CompileOptions { - update: options.flag_update_remotes, env: "test", shell: shell, jobs: options.flag_jobs, diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index b569e2c50..6962f5fd9 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -34,7 +34,6 @@ use util::config::{Config, ConfigValue}; use util::{CargoResult, Wrap, config, internal, human, ChainError, profile}; pub struct CompileOptions<'a> { - pub update: bool, pub env: &'a str, pub shell: &'a mut MultiShell<'a>, pub jobs: Option, @@ -47,7 +46,7 @@ pub struct CompileOptions<'a> { pub fn compile(manifest_path: &Path, options: &mut CompileOptions) -> CargoResult { - let CompileOptions { update, env, ref mut shell, jobs, target, + let CompileOptions { env, ref mut shell, jobs, target, dev_deps, features, no_default_features } = *options; let target = target.map(|s| s.to_string()); let features = features.iter().flat_map(|s| { @@ -56,11 +55,6 @@ pub fn compile(manifest_path: &Path, log!(4, "compile; manifest-path={}", manifest_path.display()); - if update { - return Err(human("The -u flag has been deprecated, please use the \ - `cargo update` command instead")); - } - let mut source = try!(PathSource::for_path(&manifest_path.dir_path())); try!(source.update()); -- 2.30.2